Fix usagetype parameter autocomplete#156
Conversation
|
@hsato03 can you please check the review comment? |
|
✅ Build complete for PR #156. 🔗 Download the cmk binaries (expires on August 18, 2025) |
|
a remark and a question @hsato03 :
|
|
@hsato03 (cc @winterhazel ) can you update on this? It would be nice to include it in an upcoming release. |
@DaanHoogland did you restart your Management Server(s) after setting
+1 |
winterhazel
left a comment
There was a problem hiding this comment.
Looks good. I tested the autocomplete for usagetype in the Quota APIs. It is working as intended.
./bin/cmk
Apache CloudStack 🐵 CloudMonkey 6.4.0
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues
(admin) 🐱 > quota presetvariableslist usagetype=
1 (RUNNING_VM) 2 (ALLOCATED_VM) 3 (IP_ADDRESS) 4 (NETWORK_BYTES_SENT) 5 (NETWORK_BYTES_RECEIVED) 6 (VOLUME)
7 (TEMPLATE) 8 (ISO) 9 (SNAPSHOT) 10 (SECURITY_GROUP) 11 (LOAD_BALANCER_POLICY) 12 (PORT_FORWARDING_RULE)
13 (NETWORK_OFFERING) 14 (VPN_USERS) 21 (VM_DISK_IO_READ) 22 (VM_DISK_IO_WRITE) 23 (VM_DISK_BYTES_READ) 24 (VM_DISK_BYTES_WRITE)
25 (VM_SNAPSHOT) 26 (VOLUME_SECONDARY) 27 (VM_SNAPSHOT_ON_PRIMARY) 28 (BACKUP) 29 (BUCKET) 30 (NETWORK)
31 (VPC)
@hsato03 @DaanHoogland regarding the completion for type in listUsageRecords, I think that we can address it separately, as this issue is not exclusive to usage type completion. Other APIs that have the type parameter are not completed either, even though some of them have APIs that return the possible values. listAlerts is an example.
|
right ,
I did not mean to say in this PR but yes other type parameters (or other enum values) suffer the same.
I had restarted after enabling the usage service but not the. quota service :doh:. Tested it with cc @shwstppr |
* Fix usage type autocomplete --------- Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
Currently, when using autocomplete in the
usagetypeparameter (present in APIs such asquotaPresetVariableListandquotaCreateTariff) the CLI panics.This PR aims to fix this bug and allow users to use the completer for the
usagetypeparameter.